"""
STDP.py

"""

import numpy as np

class DT(object):
    def __init__(self, a, b, c_left, c_right):
        self.a = a
        self.b = b
        self.c_left = c_left
        self.c_right = c_right

    def __call__(self, x):
        """
        x -- dt value 
        """
        a, b = self.a, self.b
        c_left, c_right = self.c_left, self.c_right

        if x>0:
            val = a*np.exp( -( (x-b)**2/(2*c_right**2) ))
        else:
            val = a*np.exp( -( (x-b)**2/(2*c_left**2) ))

        return(val)
        
        

# experimental STDP curve (normalized)
delta_t = DT(a = 1.0, b= -9.1802584 , c_left= 65.08652205,  c_right=58.16998784)
